/**
 * @author LoneWolf
 * 全局配置
 */

interface IENV_ALIAS {
    [key: string]: string
}
const ENV_ALIAS: IENV_ALIAS = {
    development: 'dev',
    production: 'prod',
    test: 'test',
}

const env = ENV_ALIAS[import.meta.env.MODE] || ENV_ALIAS.production

interface IEnvConfig {
    [key: string]: {
        baseApi: string
        mockApi: string
    }
}
const envConfig: IEnvConfig = {
    dev: {
        baseApi: 'http://127.0.0.1:88/api',
        mockApi: 'https://dev.usemock.com/626d0d4bda7eb3006f61212f',
    },
    prod: {
        baseApi: 'http://127.0.0.1:88/api',
        mockApi: 'http://127.0.0.1:88/api',
    },
    test: {
        baseApi: '',
        mockApi: '',
    },
}

export default {
    ...envConfig[env],
    env,
    namespace: 'loneWolf',
    mock: false,
}
